		TITLE	DISMAP

		INCLUDE	MACROS

		PUBLIC	DISABLE_MAPOUT,_FLUSH_DISABLE_MAPOUT


		.DATA

		EXTERNDEF	MAP_DEVICE:DWORD

		EXTERNDEF	LOUTALL:DWORD


		.CODE	ROOT_TEXT

		EXTERNDEF	_flush_trunc_close:proc,ROOT_RET:PROC


_FLUSH_DISABLE_MAPOUT	PROC
		;
		;
		;
		BITT	MAP_FLUSHED
		JNZ	L2$

		PUSHAD

		SETT	MAP_FLUSHED

		MOV	EAX,MAP_DEVICE
		push	EAX
		call	_flush_trunc_close
		add	ESP,4

		POPAD
L2$:
DISABLE_MAPOUT	LABEL	PROC

		MOV	LOUTALL,OFF ROOT_RET

		RET

_FLUSH_DISABLE_MAPOUT	ENDP

_disable_mapout	PROC
		MOV	LOUTALL,OFF ROOT_RET
		RET
_disable_mapout	endp

		END

